package com.runa.monitor.platinterface.meter3_0.task;

import lombok.Getter;
import lombok.Setter;

import java.util.UUID;

/**
 * @author diandian
 * @Date 2022/11/20 17:51
 */
@Getter
@Setter

public class TaskProxy {
    private Task task;

    //false表示未发送过，true表示已经发送了数据
    private Boolean taskState;

    private String uuid;

    public TaskProxy() {
        this.uuid = UUID.randomUUID().toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TaskProxy taskProxy = (TaskProxy) o;

        return uuid != null ? uuid.equals(taskProxy.uuid) : taskProxy.uuid == null;
    }

    @Override
    public int hashCode() {
        return uuid != null ? uuid.hashCode() : 0;
    }
}